<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户分享的文档')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content pt-md">
        <form class="form-horizontal" id="form-userShareDoc-edit" th:object="${gyUserShareDoc}">
            <input name="shareId" th:field="*{shareId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">关联的文档id：</label>
                <div class="col-sm-8">
                    <input name="fileId" th:field="*{fileId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">文档密码：</label>
                <div class="col-sm-8">
                    <input name="pwd" th:field="*{pwd}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">文件名：</label>
                <div class="col-sm-8">
                    <input name="fileName" th:field="*{fileName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分享人用户id：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">文件的扩展名：</label>
                <div class="col-sm-8">
                    <input name="fileExt" th:field="*{fileExt}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">排序：</label>
                <div class="col-sm-8">
                    <input name="orderByNo" th:field="*{orderByNo}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">被分享人"，"号分割：</label>
                <div class="col-sm-8">
                    <input name="recviveUserName" th:field="*{recviveUserName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">失效设置：0：七天，1：三十天，2：永久：</label>
                <div class="col-sm-8">
                    <input name="validState" th:field="*{validState}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">分享的链接：</label>
                <div class="col-sm-8">
                    <textarea name="urlInfo" class="form-control">[[*{urlInfo}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">生效时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="validTime" th:value="${#dates.format(gyUserShareDoc.validTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">用户名：</label>
                <div class="col-sm-8">
                    <input name="userName" th:field="*{userName}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "gy/userShareDoc";
        $("#form-userShareDoc-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-userShareDoc-edit').serialize());
            }
        }

        $("input[name='validTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>